<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2023/1/6
  Time: 16:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>商品列表</title>
    <link href="${pageContext.request.contextPath}/css/bootstrap.min.css" rel="stylesheet" >
    <script src="${pageContext.request.contextPath}/js/jquery-3.4.1.min.js"></script>
    <script src="${pageContext.request.contextPath}/js/bootstrap.min.js"></script>
</head>
<body>
<div class="table-responsive">
    <table class="table table-hover table-bordered table-striped table-condensed">
        <tr>
            <th>商品编号</th>
            <th>商品名称</th>
            <th>市场价格</th>
            <th>商城价格</th>
            <th>商品图片</th>
            <th>上架日期</th>
            <th>商品描述</th>
            <th>商品分类id</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${list}" var="p">
            <tr>
                <td>${p.pid}</td>
                <td>${p.pname}</td>
                <td>${p.market_price}</td>
                <td>${p.shop_price}</td>
                <td>${p.pimage}</td>
                <td>${p.pdate}</td>
                <td>${p.pdesc}</td>
                <td>${p.category.cid}</td>
                <td>
                    <a href="#" class="btn btn-warning">修改</a>
                    <a href="#" class="btn btn-danger">删除</a>
                </td>

            </tr>
        </c:forEach>
    </table>
</div>

</body>
</html>
